import request from '@/utils/request.js'

export default {
    searchAdver(pageNum, pageSize, keyWords) {
        return request({
            url: `/api/adver/search/${pageNum}/${pageSize}`,
            method: 'post',
            data: keyWords,
        })
    },

    getAdverById(id) {
        return request({
            url: `/api/adver/getAdverById/${id}`,
            method: 'get',
        })
    },

    saveAdver(adver) {
        return request({
            url: `/api/adver/saveAdver`,
            method: 'post',
            data: adver
        })
    },

    updateAdver(adver) {
        return request({
            url: `/api/adver/updateAdver`,
            method: 'put',
            data: adver
        })
    },

    removeAdvers(ids) {
        return request({
            url: `/api/adver/removeAdvers`,
            method: 'delete',
            data: ids
        })
    },
}